Prizm Document Converter provides samples demonstrating integration of the proxy server file converter into the web application. The Converter samples are installed in the <Install Location>\Samples directory. The following samples are included: Visual C# ASP.NET, JSP, and PHP.
ASP.NET Sample
The C# ASP.NET sample was created in Visual Studio 2010 in .NET Framework 4.0. The installer configures the .NET sample to run out of the box on a machine with IIS installed. The Virtual Directory, PrizmDC_Samples_Converter_CS will be created. For more details on IIS samples configuration, refer to the Installation Guide.
If you choose to install the samples, the following IIS Applications will be created:
-
PrizmDC_Samples_Converter_CS - C# version of the file converter web sample
You can run the ASP.NET sample in the following ways:
-
From the Start menu, choose Programs| Accusoft| Prizm Document Converter| Samples and select the sample that you wish to run. Running the sample will launch the web application in a browser.
-
From the Start menu, choose Programs| Accusoft| Prizm Document Converter, open the Samples Folder and run the samples in Visual Studio by opening the solution file. Set the default page to Default.aspx.
You can use the following file to configure the web application:
-
prizmconfig.xml – web application configuration file. This file is used to configure handling of the web request and web application settings.
It might be necessary to configure the values in prizmconfig.xml to fit your local Prizm Service installation. The following table describes the configuration parameters:
Parameter Name (param-name) |
Parameter Value (param-value) |
Description |
TempcachePath |
Windows:
Linux:
|
Path where the temporary cache files are located |
WebServiceScheme |
http |
Prizm Service REST API web service scheme |
WebServiceHost |
localhost |
Prizm Service REST API web service hostname |
WebServicePort |
18680 |
Prizm Service Proxy REST API web service port number |
PHP Sample
The PHP sample needs to be configured manually. This sample requires PHP 5.0 or higher.
We recommend you map the corresponding sample path as an alias on your web server. Please refer to the Apache manual or the Tomcat manual for details.
You can use the following file to configure the web application:
-
prizmconfig.xml – web application configuration file. This file is used to configure handling of the web request and web application settings.
It might be necessary to configure the values in prizmconfig.xml to fit your local Prizm Service installation. The following table describes the configuration parameters:
Parameter Name (param-name) |
Parameter Value (param-value) |
Description |
TempcachePath |
Windows:
Linux:
|
Path where the temporary cache files are located |
WebServiceScheme |
http |
Prizm Service REST API web service scheme |
WebServiceHost |
localhost |
Prizm Service REST API web service hostname |
WebServicePort |
18680 |
Prizm Service Proxy REST API web service port number |
JSP Sample
The JSP sample needs to be configured manually. This sample requires Apache Tomcat 6 or higher to be installed, Apache Ant™ 1.9 or higher and Java JDK 1.6 is required to compile the sample WAR file. We recommend you map the corresponding sample path as an alias on your web server. Please refer to the Apache manual or the Tomcat manual for details.
You can use the following files to configure the web application:
-
public_html/index.jsp – main JSP page containing JS code that loads the client side application.
-
public_html/WEB-INF/web.xml – J2EE web application configuration file. This file is used to configure handling of the web request and web application settings.
It might be necessary to configure the values in web.xml to fit your local Prizm Service installation. The following table describes the configuration parameters:
Parameter Name (param-name) |
Parameter Value (param-value) |
Description |
TempcachePath |
Windows:
Linux:
|
Path where the temporary cache files are located |
WebServiceScheme |
http |
Prizm Service REST API web service scheme |
WebServiceHost |
localhost |
Prizm Service REST API web service hostname |
WebServicePort |
18680 |
Prizm Service Proxy REST API web service port number |
JSP sample can be compiled using Apache Ant™ compiler.
On Windows, this can be achieved by executing the following set of commands in the command line terminal (cmd.exe):
![]() |
|
---|---|
cd C:\Prizm\Samples\Converter\jsp |
Note that the above example commands assume:
-
Apache Ant™ is installed in C:\apache-ant-1.9.0\
-
Java JDK is installed in C:\Program Files\Java\jdk1.6.0_35\
-
Prizm is installed in C:\Prizm\
On Linux, please refer to documentation on how to install Apache Ant™ as described at http://ant.apache.org/manual/index.html. Then, issue the ant compiler commands inside JSP sample root folder, e.g.:
![]() |
|
---|---|
# cd /usr/share/prizm/Samples/Converter/jsp/ # ant clean # ant war |
The result of the successful build is the fileconverter.war file located in target folder under JSP sample root folder. Follow the Tomcat documentation instructions on how to redeploy newly compiled fileconverter.war.